<div class="box-body">
    <form class="layui-form" action="{:url('/wms/wshelf/save')}" method="post">
        <div class="layui-form-item">
            <label class="layui-form-label xrequired">所属区域</label>
            <div class="layui-input-block">
                <select id="area-id" name="area_id" lay-search lay-verify="required">
                    <option value="">请选择</option>
                    {foreach $area as $s}
                    <option {if isset($shelf) && $shelf.area_id == $s.area_id}selected{/if} value="{$s.area_id}">{$s.name}</option>
                    {/foreach}
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label xrequired">货架状态</label>
            <div class="layui-input-block">
                <select name="status" lay-search lay-verify="required">
                    {foreach $status as $k=>$v}
                    <option {if isset($shelf) && $shelf->getData('status') == $k}selected{/if} value="{$k}">{$v}</option>
                    {/foreach}
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">货架编号</label>
            <div class="layui-input-block">
                <input type="text" autocomplete="off" placeholder="货架编号"  name="code" {if isset($shelf)}value="{$shelf.code}"{/if} class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">货架层数</label>
            <div class="layui-input-block">
                <input type="number" autocomplete="off" placeholder="区域面积"  name="level" {if isset($shelf)}value="{$shelf.level}"{else}value="0"{/if} class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <input type="text" autocomplete="off" placeholder="备注"  name="remark" {if isset($shelf)}value="{$shelf.remark}"{/if} class="layui-input" />
            </div>
        </div>
        {if isset($shelf)}
        <input type="hidden" name="shelf_id" value="{$shelf.shelf_id}">
        {/if}
    </form>
</div>